﻿<%@ Page Title="" Language="C#" MasterPageFile="~/SiteAdmin.Master" AutoEventWireup="true" CodeBehind="VideoList.aspx.cs" Inherits="KioskosJugandoLimpio.Admin.Denuncias.VideoList" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <script src="../../Scripts/jquery141.js" type="text/javascript"></script>

    <link href="../../Scripts/jqueryfancybox134.css" rel="stylesheet" type="text/css" />
   
    <script type="text/javascript" src="../../Scripts/cufonyui.js"></script>
    <script type="text/javascript" src="../../Scripts/arial.js"></script>
    <script type="text/javascript" src="../../Scripts/cuf_run.js"></script>
    <script type="text/javascript" src="../../Scripts/jqueryfeatureCarousel.js"></script>
    <script type="text/javascript" src="../../Scripts/form.js"></script>

    <script type="text/javascript" src="../../Scripts/jquerymousewheel304pack.js"></script>
    <script type="text/javascript" src="../../Scripts/jqueryfancybox134pack.js"></script>

<script language="javascript" type="text/javascript">

    $(document).ready(function () {
        $("a[href*='?guid=']").fancybox({
            'width': '30%',
            'height': '35%',
            'autoScale': false,
            'transitionIn': 'elastic',
            'transitionOut': 'elastic',
            'type': 'iframe'
        });
    });
    
</script>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    
 
    <asp:GridView ID="GridView1" runat="server" AllowSorting="True" 
        AutoGenerateColumns="False" DataKeyNames="idDenuncias" DataSourceID="VideoDS2" 
            AllowPaging="True">
        <Columns>

            <asp:CheckBoxField DataField="Capturado" HeaderText="Capturado" 
                SortExpression="Capturado" />
            
            <asp:BoundField DataField="Fecha" HeaderText="Fecha" SortExpression="Fecha" />

            
            
               
            <asp:HyperLinkField DataNavigateUrlFields="VideoGuid" 
                DataNavigateUrlFormatString="Video.aspx?guid={0}" HeaderText="Video" 
                Text="Ver" />
                
            


            <asp:HyperLinkField DataNavigateUrlFields="VideoGuid" 
                DataNavigateUrlFormatString="VideoList.aspx?command=delete&amp;guid={0}" 
                Text="Marcar como capturado" />

        </Columns>
    </asp:GridView>


        <asp:SqlDataSource ID="VideoDS2" runat="server" 
            ConnectionString="<%$ ConnectionStrings:kioskosConnectionString %>" 
            DeleteCommand="DELETE FROM [Denuncias] WHERE [idDenuncias] = @idDenuncias" 
            InsertCommand="INSERT INTO [Denuncias] ([VideoGuid], [Fecha], [Capturado]) VALUES (@VideoGuid, @Fecha, @Capturado)" 
            SelectCommand="SELECT * FROM [Denuncias] WHERE ([Capturado] = @Capturado)" 
            UpdateCommand="UPDATE [Denuncias] SET [VideoGuid] = @VideoGuid, [Fecha] = @Fecha, [Capturado] = @Capturado WHERE [idDenuncias] = @idDenuncias">
            <DeleteParameters>
                <asp:Parameter Name="idDenuncias" Type="Int32" />
            </DeleteParameters>
            <InsertParameters>
                <asp:Parameter Name="VideoGuid" Type="String" />
                <asp:Parameter Name="Fecha" Type="DateTime" />
                <asp:Parameter Name="Capturado" Type="Boolean" />
            </InsertParameters>
            <SelectParameters>
                <asp:Parameter DefaultValue="false" Name="Capturado" Type="Boolean" />
            </SelectParameters>
            <UpdateParameters>
                <asp:Parameter Name="VideoGuid" Type="String" />
                <asp:Parameter Name="Fecha" Type="DateTime" />
                <asp:Parameter Name="Capturado" Type="Boolean" />
                <asp:Parameter Name="idDenuncias" Type="Int32" />
            </UpdateParameters>
        </asp:SqlDataSource>
        
    
    <asp:SqlDataSource ID="VideosDS" runat="server" 
        ConnectionString="<%$ ConnectionStrings:kioskosConnectionString %>" 
        SelectCommand="SELECT * FROM [Denuncias] WHERE Capturado = 0"></asp:SqlDataSource>
    </asp:Content>
